import Vue from 'vue'
import SvgIcon from '@/components/SvgIcon'// svg component

// register globally
Vue.component('svg-icon', SvgIcon)

// require.context(directory,useSubdirectories,regExp)
/*
  directory ===> 表示检索的目录
  useSubdirectories ===> 表示是否检索子文件夹
  regExp ===> 正则表达式
*/
const req = require.context('./svg', false, /\.svg$/)
console.dir(req, '@@@@@@@@@')
//  req.keys()['./dashboard.svg', './example.svg']

const requireAll = requireContext => requireContext.keys().map(requireContext)
requireAll(req)
